- if @errors
  $('#flash').html("#{escape_javascript(render(partial: 'layouts/webui/flash', locals: { flash: { error: @errors } }))}");
  $("html, body").scrollTop(0);
  liveLog.browserNotification('#{@status}');
  liveLog.finish("#{@status}");
- else
  - if @finished
    - if @first_request
      $('#log-space').html('#{escape_javascript(sanitize @log_chunk)}');
    - else
      liveLog.browserNotification('#{@status}');
    liveLog.finish("#{@status}");
  - else
    $('#log-space').append('#{escape_javascript(sanitize @log_chunk)}');
    liveLog.showAbort();
    liveLog.offset = #{@offset};
    setTimeout($.proxy(liveLog.loadContent, liveLog), 2000);
  liveLog.autoScroll();
